package com.map;

import com.iottepa.support.datasources.DynamicDataSourceConfig;
import com.map.core.consts.CommonConsts;
import com.map.core.vo.ReturnEnum;
import com.map.modules.controller.ConfigController;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@Import({
		DynamicDataSourceConfig.class
})
public class IotSecIntegratedApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(IotSecIntegratedApplication.class, args);
		//启动时候，设置为空闲
		//告知彼方自己的状态
		ConfigController.setStatus("free");
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(IotSecIntegratedApplication.class);
	}
}
